﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TalkManager : MonoBehaviour
{
    public Image Back;

    public Image picture;

    public Text 内容;

    public Image Head;

    public GameObject H1;

    public GameObject H2;

    [HideInInspector]
    public string _内容;

    [HideInInspector]
    public Sprite head;

    public bool IsPlayer = false;

    public bool IsPicture= false;

    void Start()
    {
        Head.sprite = head;
        内容.text = _内容;
        if (IsPlayer)
        {
            H1.SetActive(false);
        }
        else
        {
            H2.SetActive(false);
        }

        if (IsPicture)
        {
            picture.gameObject.SetActive(true);
            Back.rectTransform.sizeDelta = new Vector3(950, 400);
        }
        else
        {
            picture.gameObject.SetActive(false);
            Back.rectTransform.sizeDelta = new Vector3(950, 190);
        }
    }
}
